package org.lztvn.elearning.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.validator.constraints.NotEmpty;

@Entity
@Table(name = "command_line")
public class CommandeLine implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -4031125310904524043L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long idCmdLine;
	
	private Integer qty;
	
	@ManyToOne
	@JoinColumn(name="command")
	private Command cmd;

	@ManyToOne
	@JoinColumn(name="product")
	private Product prod;
	
	public Long getIdCmdLine() {
		return idCmdLine;
	}

	public void setIdCmdLine(Long idCmdLine) {
		this.idCmdLine = idCmdLine;
	}

	public Integer getQty() {
		return qty;
	}

	public void setQty(Integer qty) {
		this.qty = qty;
	}

	public Command getCmd() {
		return cmd;
	}

	public void setCmd(Command cmd) {
		this.cmd = cmd;
	}

	
	
	public Product getProd() {
		return prod;
	}

	public void setProd(Product prod) {
		this.prod = prod;
	}

	public CommandeLine() {
		super();
		// TODO Auto-generated constructor stub
	}

	public CommandeLine(Integer qty, Command cmd) {
		super();
		this.qty = qty;
		this.cmd = cmd;
	}
	
	public CommandeLine(Integer qty, Command cmd, Product prod) {
		super();
		this.qty = qty;
		this.cmd = cmd;
		this.prod = prod;
	}
	
	
	
}
